-
Notifications
You must be signed in to change notification settings - Fork 22.7k
Clarify note on customized built-ins support in Safari #35489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The "Using Custom Elements" page lists customized build-ins first in the discussion of types of custom elements, even though it isn't and won't be supported in Safari. It seems like we should mention the cross-browser supported feature first. Also, the note on this page doesn't actually say anything about the implementation status, but links to the is= attribute, making it harder to see that Safari will not implement the feature. I replaced the note here with the note from the is= attribute page, which is a lot more clear and informative.
> [!NOTE] | ||
> Please see the [`is`](/en-US/docs/Web/HTML/Global_attributes/is) attribute reference for caveats on implementation reality of custom built-in elements. | ||
|
||
- **Autonomous custom elements** inherit from the HTML element base class {{domxref("HTMLElement")}}. You have to implement their behavior from scratch. | ||
> [Safari does not plan to support custom built-in elements](https://github.com/WebKit/standards-positions/issues/97) and [browser vendors are exploring alternative solutions to customizing built-ins](https://github.com/WICG/webcomponents/issues/1029). Check the [browser compatibility](#browser_compatibility) section for support information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mdn-linter] reported by reviewdog 🐶
> [!NOTE] | |
> Please see the [`is`](/en-US/docs/Web/HTML/Global_attributes/is) attribute reference for caveats on implementation reality of custom built-in elements. | |
- **Autonomous custom elements** inherit from the HTML element base class {{domxref("HTMLElement")}}. You have to implement their behavior from scratch. | |
> [Safari does not plan to support custom built-in elements](https://github.com/WebKit/standards-positions/issues/97) and [browser vendors are exploring alternative solutions to customizing built-ins](https://github.com/WICG/webcomponents/issues/1029). Check the [browser compatibility](#browser_compatibility) section for support information. | |
> [!NOTE] > [Safari does not plan to support custom built-in elements](https://github.com/WebKit/standards-positions/issues/97) and [browser vendors are exploring alternative solutions to customizing built-ins](https://github.com/WICG/webcomponents/issues/1029). Check the [browser compatibility](#browser_compatibility) section for support information. |
Preview URLs External URLs (2)URL:
(comment last updated: 2024-08-16 17:46:00) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+0.5 for reordering, -1 for replacing the note. The point here is to have a single source of truth to explain about the Safari situation, so if we have more explanations to add or the situation changes, we don't need to find all mentions. This note is at the very top of is
so I don't think it's undiscoverable.
The problem is that the key takeaway - that Safari will not implement this feature - is buried on a page that's about one aspect of the feature. It's not just the This doesn't work in Safari and doesn't use the customElements.define('my-button', class extends HTMLButtonElement {}, {extends: 'button'});
document.createElement('my-button'); So if there should be a single source of truth, the But also, this piece of information is so important that is could be clearly mentioned as a caveat on every feature related to customized built-ins. I think it's not clear enough to new readers to say "click here for caveats" rather than "this feature will never work on Safari" right where they're reading. |
We are pretty set on the principle that "don't duplicate information if it's possible; link to one canonical source of explanation". |
@Josh-Cena ok, so how about if I move the canonical location of the note to "Using Custom Elements" and add the redirect note to |
Yep, that sounds good (and the other locations I pointed above, which already have this note) |
@justinfagnani Do you plan to come back to work on this? |
@justinfagnani I played with this and I think it's best to link to |
Description
Re-order the custom element types to put the most supported type first and make the note about customized built-ins more useful.
I replaced the note here with the note from the is= attribute page, which is a lot more clear and informative.
Motivation
The "Using Custom Elements" page lists customized build-ins first in the discussion of types of custom elements, even though it isn't and won't be supported in Safari. It seems like we should mention the cross-browser supported feature first.
Also, the note on this page doesn't actually say anything about the implementation status, but links to the is= attribute, making it harder to see that Safari will not implement the feature.
Additional details
Related issues and pull requests